package com.module.product.common;

import java.util.UUID;

/**
 * @ IDManage.java 
 * 作用
 * 注意事项
 * 注意�?本内容仅限于广州宽度内部使用，禁止转�?
 * VERSION       DATE            BY       CHANGE/COMMENT
 * 1.0          Jul 21, 2010          Name         create
 */
public class IDManage {
	public synchronized static String getUUIDString() {   
        String id = UUID.randomUUID().toString();   
        id = id.replace("-", "");   
        return id;   
    } 
	
	
	public static synchronized String getUniqueStringForProduct()
    {
        if(generateCount > 999)
            generateCount = 0;
        String uniqueNumber = Long.toString(System.currentTimeMillis()) + Integer.toString(generateCount);
        generateCount++;
        return uniqueNumber;
    }

    private static final int MAX_GENERATE_COUNT = 99999;
    private static int generateCount = 0;

}
